package day1;

/**
 * @author oldliu
 * @since 1.0
 */
public class StrTest4 {
    public static void main(String[] args) {
        String s1="   ab c   ";
        System.out.println(s1.length());
        s1=s1.trim();//去两头空格
        System.out.println(s1.length());
        System.out.println(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>");
        String st="dog is not a dog,but our friends";
        String s4 = st.replace("dog", "cat");
        System.out.println(s4);
    }
}
